home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Diskcaches / SmartCache / SmartCache.Doc < prev    next >
Text File  |  1996-09-26  |  9KB  |  209 lines

  1. SmartCache v1.77a.02.17.93
  2. Copyright © 1994 by Thomas J. Czarnecki
  3. All Rights Reserved
  4.  
  5.  
  6.     "SmartCache" is a small 100% assembly language program that patches
  7.     itself into the 'trackdisk.device' to provide a cylinder 'Caching'
  8.     mechanism for all the floppy disk drives (including the new HD
  9.     floppy drives) you have connected to your Amiga. The result is a
  10.     huge increase in overall floppy performance at the small cost of
  11.     using your excess memory!
  12.     
  13.    ----------------------------------------------------------------------
  14.    LEGAL NOTICE
  15.  
  16.     This  program is Copyrighted and may only be (re)distributed in a
  17.     non-commercial manner, such as PD/Shareware disks or BBS's, provided
  18.     that the distribution is complete and unmodified in any way.
  19.       
  20.     Also, this program is for personal (non-commercial) use only, and
  21.     may NOT be used in any other form or manner.
  22.      
  23.     There is no warranty on this program. I disclaim any and all
  24.     responsibility for any damages that use of this program may
  25.     cause, by  direct or indirect use.
  26.  
  27.     If you have a commercial project that could benefit from this
  28.     program, please contact me, I would welcome all inquiries!
  29.  
  30.    ----------------------------------------------------------------------
  31.  
  32.     I wrote this program because I was tired of hearing the grinding that
  33.     occurs when I use my floppy drives.  My reasoning was that if I
  34.     stored (cached) the cylinders that the drive kept accessing the most
  35.     that I would stop most of the back-forth movement of the drives
  36.     heads, thus stopping most of the grinding!  It works great, not only
  37.     is the head grinding reduced, but there is a large decrease in access
  38.     time!  The more the drive is accessed the better the results are.
  39.     
  40.     Before writing this program I tried using the 'AddBuffers' command,
  41.     but found that you have to supply buffers to each drive and that on
  42.     pre 2.0x systems that the buffers use precious Chip memory.  I wanted
  43.     a system that shared all the buffers, many times I do NOT even use
  44.     my second drive and do NOT what to waste memory on unused buffers!
  45.     Also, I wanted a system that used my excess Fast memory first, NOT my
  46.     precious Chip memory!  Also 'AddBuffers' only caches the requested
  47.     blocks (NO prefech) which is NOT efficient since there are many other
  48.     blocks near the requested one on the same cylinder (with NO head
  49.     stepping!)
  50.     
  51.     What the user does is startup 'SmartCache' with the total amount of
  52.     Caches allowed (for all the drives) and 'SmartCache' will take it
  53.     from there by caching the most used cylinders so that repeated access
  54.     to those cylinders will be from memory!  I decided to cache whole
  55.     cylinders at a time because the slowest element in the floppy drive
  56.     system is the stepping of the read/write heads so by caching whole
  57.     cylinders I improve the odds of stopping a head movement operation by
  58.     prefeching the blocks near the request ones on the same cyclinder.
  59.    
  60.     A program such as this is very memory hungry so adjusting the 'Total'
  61.     amount of caches allowed is very important, choose a amount that is a
  62.     balance between increased performace verses the amount of free memory
  63.     available for your work.  I can NOT give you a the amount because it
  64.     will be variable for every system. I have a large amount a memory
  65.     (4 Megs of Fast & 1 Meg of Chip) and two floppy drives (one a new HD
  66.     floppy drive) and I found that I can use up to 63 caches without any
  67.     problem.  To calculate the amount of memory that is required for each
  68.     cache is easy just multiply by 11K (22K for the new HD flopply drives)
  69.     for each cache.  My 63 caches for example can take as much as 693K if
  70.     I am using normal diskettes or as much as 1.39Megs if I am using HD
  71.     diskettes in my HD floppy drive!
  72.     
  73.     What is nice about "SmartCache" is that the caches are dynamically
  74.     allocated at access time, which means if you are NOT using your floppy
  75.     drives you are NOT using any memory for them.  If you find that you
  76.     have set the amount of caches to high and because of that are running
  77.     low on free memory, just eject your diskettes from their drives, the
  78.     caches will be flushed and their memory returned back to the system!
  79.     Then be smart and lower the total amount of caches allowed, it is too
  80.     easy to crash any system that is low on free memory!
  81.     
  82.     
  83.     To start "SmartCache" from Workbench, just double click on its Icon.
  84.     
  85.  
  86.     To start "SmartCache" from the CLI/Shell, CD to the correct
  87.     drive/directory and type:
  88.  
  89. SmartCache #<RETURN>
  90.  
  91.     Where '#' is the total amount of caches to allocate.  The default is
  92.     11 caches.
  93.  
  94.  
  95.     To specify the total amount of caches when starting from Workbench:
  96.  
  97.            Write "CACHES=#" in the "Tool Types" field of the 
  98.            "SmartCache" Tool Icon.  Where '#' is total amount
  99.            that you what allocated!
  100.  
  101.       
  102.     Note, 2.xx/3.xx users the best way to install "SmartCache" in your
  103.     system is to add the 'DONOTWAIT' tool type definition to the 
  104.     "SmartCache" Icon, and then drop the "SmartCache" Icon into the
  105.     "WBStartup" drawer!
  106.  
  107.  
  108.         (Note: That the program is self-detaching, do NOT Run it!
  109.                It also sets the correct stack-size and priority, don't
  110.                waste time adjusting them!)
  111.  
  112.  
  113.     To remove "SmartCache" just start up the program again!
  114.     
  115.     
  116.     --- Limits ---
  117.     
  118.     Here are a few problems that may effect users:
  119.     
  120.      1) Poor shutdown code.  When you shutdown the program make sure that
  121.         there is NO drive activity!  I did NOT waste time on this function
  122.         because I NEVER shut "SmartCache" down.
  123.         
  124.      2) No write caching.  I must read a diskette a 20-50 times compared
  125.          to one writing operation, so I spend my time where I would get the
  126.          best return!  I just write the request block to the diskette and
  127.         update any effected caches in the current design.
  128.         
  129.      3) Poor error handling.  When a problem occurs I just flush the buffer
  130.         and pass the problem on!  So if you find that "SmartCache" is NOT
  131.         working with a diskette the problem maybe in the diskette!
  132.         
  133.      4) Synchronous design.  Waiting on a un-cached read/write may slow
  134.          the system down.  Time wasted there is easy made up by accesses to
  135.          cached cyclinders though!
  136.          
  137.      5) Dependent on the interaction between the 'FileSystem' and the
  138.          'TrackDisk.device'  To keep the design of "SmartCache" as simple
  139.          as possible, thus keep it small and reliable, I decided to patch
  140.          in between the two and use their interaction to my advantage.
  141.          The down side to this is that I do NOT know if other custom
  142.          'FileSystems' will work with "SmartCache"  My quess is that this
  143.          will only be a problem with "Games" that take over the system!
  144.          
  145.     ---            
  146.         
  147.     
  148.     NOTE: To HD floppy users, when I first started using my new HD floppy
  149.           drive, I experienced problems (corrupted HD diskettes) when I
  150.           mixed the two types of diskettes in the same drive!  Since I
  151.           started using "SmartCache" the problem has gone away?  I would
  152.           like to hear from any HD floppy users if you have experienced
  153.           the  same problem as I have, and does using "SmartCache" also fix
  154.           the problem for you?
  155.           
  156.     
  157.     
  158.     --- In the future ---
  159.         
  160.     Here are a few things that I would like to add/change in a future
  161.     version:
  162.     
  163.      1) A memory watch function that would automactically free the least
  164.         used cache if the available amount of free memory was getting low!
  165.         
  166.      2) A true write cache.  One that caches the write and then writes the
  167.         caches in manner that moves the head in the least distance!
  168.         
  169.      3) A better cache search method. The current method is too primitive
  170.         of a method that slows down with a large amount of caches!
  171.         (still faster then none!)
  172.         
  173.      4) Better error handling.  In this version if there is a error or a
  174.         any problem I just flush one or all of the caches, and pass the
  175.         problem on.  This can be improved in many ways!
  176.         
  177.      5) A better shutdown function.  The way it works now is NOT smart!
  178.      
  179.      6) Maybe a true asynchronous design.  May improve overall speed, but
  180.         does any body access floppy drive in a asynchronous manner?  The
  181.         current synchronous design only slows the system down if the
  182.         required block is NOT cached!  Also a true asynchronous design
  183.         would double the complexity and size of the program!
  184.         
  185.         
  186.             
  187.     I plan to make improvements to "SmartCache" in the future, but do NOT
  188.     plan to offer any updates unless one of two things occur.  One, a large
  189.     enough group of user write to me requesting a update!  Or two, someone
  190.     makes me a good offer to market an updated version!
  191.     
  192.     ---
  193.     
  194.     Anyway, I have been using this version for over a year without any
  195.     problem and I hope you find this program as useful as I have!  Have fun!
  196.     
  197.  
  198.     Tempus Fugit,
  199.  
  200.         Czar
  201.  
  202.  
  203. If you have any ideas, comments, bugs to report, please write me:
  204.  
  205.  Thomas J. Czarnecki
  206.  3526 Republic Avenue
  207.  Racine, WI 53405-3856
  208.  
  209.